package club.emergency.wechat.model.question;

import club.emergency.wechat.model.GenericEntity;
import club.emergency.wechat.model.option.ChoiceOption;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 题目pojo
 * </p>
 *
 * @author jifujun
 * @since 2018-11-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class Question extends GenericEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 试题内容
     */
    private String content;

    /**
     * 正确选项
     */
    private String rightOption;

    /**
     * 正确选项内容
     */
    private String rightOptionContent;

    /**
     * 试题类型（0 单选，1 判断）
     */
    private Integer kind;

    /**
     * 试题种类id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;

    /**
     * 试题种类关键字
     */
    private String categoryAlias;

    /**
     * 试题种类
     */
    private String category;

    /**
     * 自动迁移算法slot,禁止修改
     */
    @TableField(exist = false)
    private Integer slot;

    /**
     * 选项列表
     */
    @TableField(exist = false)
    private List<ChoiceOption> choiceOptionList;
}
